<?
session_start(); 
//include("database.php");
//include("login.php");

/**
 * Delete cookies - the time must be in the past,
 * so just negate what you added when creating the
 * cookie.
 */
if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpass'])){
   setcookie("cookname", "", time()-60*60*24*100, "/");
   setcookie("cookpass", "", time()-60*60*24*100, "/");
   setcookie("cookreg", "", time()-60*60*24*100, "/");
   setcookie("cookdatatable", "", time()+60*60*24*100, "/");
   setcookie("cookcomp", "", time()+60*60*24*100,"/");
}

?>

<html>
<title>Logging Out</title>
<body>

<?


   /* Kill session variables */
   unset($_SESSION['username']);
   unset($_SESSION['password']);
   unset($_SESSION['name']);
   unset($_SESSION['regional']);   
   $_SESSION = array(); // reset session array
   session_destroy();   // destroy session.

   echo "<h1>Logged Out</h1>\n";
   echo "<meta http-equiv=\"Refresh\" content=\"0;url=index.php\">";


?>

</body>
</html>